package com.shiro.dao;

import com.shiro.domain.Primission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface PrimissionDao {
    @Select("select * from permission WHERE id = #{id} or pid = #{id} or pid in (select id from permission WHERE id = #{id} or pid = #{id})")
    List<Primission> selectPrimissionById(@Param("id") int id);
}
